package com.example.demo;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class EndActivity extends AppCompatActivity {

    TextView mtxthome;

    TextView mtxtpio;

    TextView mtxtuser;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.end);

        bindView();
        Onclicklistener();

    }
    //UI组件初始化
    private void bindView() {
        mtxthome = findViewById(R.id.txt_home);
        mtxtpio = findViewById(R.id.txt_poi);
        mtxtuser = findViewById(R.id.txt_user);
    }

    //组件的点击事件
    private void Onclicklistener() {
        //主页点击事件
        mtxthome.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            }
        });
        //动态的点击事件
        mtxtpio.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            }
        });
        //用户的点击事件
        mtxtuser.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //这里需要判断用户是否登录 如果已经登录

                //没登录 跳转到登录页面去
                Intent intent = new Intent(EndActivity.this,PersonalActivity.class);
                startActivity(intent);

            }
        });

    }

}
